﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _2021_5_24
{
    //交通工具
    class Vehicle
    {
        private string vehicleName;

        public string VehicleName { get => vehicleName; set => vehicleName = value; }

        public Vehicle(string name)
        {
            VehicleName = name;
        }

    }

    class Plane : Vehicle , IFlyable
    {
        public Plane() :base(name:"飞机")
        {

        }

        public void TakeOff()
        {
            Console.WriteLine("{0}准备起飞", this.VehicleName);
        }
        public void Fly()
        {
            Console.WriteLine("{0}飞行中...", this.VehicleName);
        }
        public void Land()
        {
            Console.WriteLine("{0}准备着陆", this.VehicleName);
        }
    }
}
